<div class="wrapper clearfix" id="search-bar">

    <div class="section icon">
        <img width="100%" src="<?php echo base_url() ?>img/icon-magnify.png">
    </div>

    <div class="section salerent">
        <strong>
            BUY</strong>
    </div>

    <div class="section range">
        <strong>Min - Max</strong>
    </div>

    <div class="section last particular">
        <span class="picon beds">-</span>
        <span class="picon baths">-</span>
        <span class="picon cars">-</span>
    </div>
    <div class="clearer"></div>
</div>
<div style="display: none;" class="" id="searchform-properties">

    <!-- Form body -->
    <form action="" method="get">
        <!-- Title -->
        <div class="clearfix">
            <label>
                <input type="text" value="Suburb/Towna" name="suburbs" class="col2">
            </label>
        </div>

        <div class="section clearfix">
            <label class="toggle-label">Surrounding Suburbs</label>
            <div style="display:none;" class="toogles">
                <input type="radio" value="1" name="surroundingSuburbs" id="surroundingSuburbs_yes">
                <input type="radio" checked="checked" value="0" name="surroundingSuburbs" id="surroundingSuburbs_no">
            </div>
            <div class="toggle-button clearfix ">
                <button value="yes" class="yes "></button>
                <button value="no" class="no selected"></button> 
            </div>
        </div>

        <div class="section clearfix">
            <label>
                <select name="min">
                    <option selected="selected" value="" class="omit">Min Price</option>
                    <option value="50000">$50,000</option>
                    <option value="100000">$100,000</option>
                    <option value="150000">$150,000</option>
                    <option value="200000">$200,000</option>
                    <option value="250000">$250,000</option>
                    <option value="300000">$300,000</option>
                    <option value="350000">$350,000</option>
                    <option value="400000">$400,000</option>
                    <option value="450000">$450,000</option>
                    <option value="500000">$500,000</option>
                    <option value="550000">$550,000</option>
                    <option value="600000">$600,000</option>
                    <option value="650000">$650,000</option>
                    <option value="700000">$700,000</option>
                    <option value="750000">$750,000</option>
                    <option value="800000">$800,000</option>
                    <option value="850000">$850,000</option>
                    <option value="900000">$900,000</option>
                    <option value="950000">$950,000</option>
                    <option value="1000000">$1,000,000</option>
                    <option value="1200000">$1,200,000</option>
                    <option value="1400000">$1,400,000</option>
                    <option value="1600000">$1,600,000</option>
                    <option value="1800000">$1,800,000</option>
                    <option value="2000000">$2,000,000</option>
                </select>
            </label>
            <label>
                <select name="max" class="last">
                    <option selected="selected" value="" class="omit">Max Price</option>
                    <option value="50000">$50,000</option>
                    <option value="100000">$100,000</option>
                    <option value="150000">$150,000</option>
                    <option value="200000">$200,000</option>
                    <option value="250000">$250,000</option>
                    <option value="300000">$300,000</option>
                    <option value="350000">$350,000</option>
                    <option value="400000">$400,000</option>
                    <option value="450000">$450,000</option>
                    <option value="500000">$500,000</option>
                    <option value="550000">$550,000</option>
                    <option value="600000">$600,000</option>
                    <option value="650000">$650,000</option>
                    <option value="700000">$700,000</option>
                    <option value="750000">$750,000</option>
                    <option value="800000">$800,000</option>
                    <option value="850000">$850,000</option>
                    <option value="900000">$900,000</option>
                    <option value="950000">$950,000</option>
                    <option value="1000000">$1,000,000</option>
                    <option value="1200000">$1,200,000</option>
                    <option value="1400000">$1,400,000</option>
                    <option value="1600000">$1,600,000</option>
                    <option value="1800000">$1,800,000</option>
                    <option value="2000000">$2,000,000</option>
                </select>
            </label>

        </div>

        <div class="section clearfix">
            <label>
                <select name="type">
                    <option value="" class="omit">Property Type</option>
                    <option value="residential" selected="selected">Residential</option>
                    <option value="rental">Rental</option>
                    <option value="commercial">Commercial</option>
                </select>
            </label>
            <label>
                <select name="bedrooms" class="last">
                    <option selected="selected" value="" class="omit">Bedrooms</option>
                    <option value="1">1</option>
                    <option value="2">2</option>
                    <option value="3">3</option>
                    <option value="4">4</option>
                    <option value="5">5</option>
                    <option value="6">6</option>
                    <option value="7">7</option>
                    <option value="8">8</option>
                    <option value="9">9</option>
                </select>
            </label>
            <label>
                <select name="bathrooms">
                    <option selected="selected" value="" class="omit">Bathrooms</option>
                    <option value="1">1</option>
                    <option value="2">2</option>
                    <option value="3">3</option>
                    <option value="4">4</option>
                    <option value="5">5</option>
                    <option value="6">6</option>
                    <option value="7">7</option>
                    <option value="8">8</option>
                    <option value="9">9</option>
                </select>
            </label>
            <label>
                <input type="submit" value="SEARCH" name="search">
            </label>	
        </div>
    </form>
</div>
<div id="page-body" class="white-bg">
    <div class="clearer"></div>



    <ol class="properties list-view">
        <li class="first even " id="listing-44580">	          
            <div class="property clearfix">
                <!-- Property image -->
                <div class="property-image">
                    <!-- Property image -->
                    <a href="<?php echo site_url('buying/house');  ?>" class="post-image">
                        <div><img src="<?php echo base_url(); ?>img/home-image1.png" style="width: 100%;height:100%;"></div>
                    </a>
                </div>

                <!-- Property  details -->
                <div class="property-body">
                    <!-- Property meta -->
                    <div class="property-meta">
                        <div class="price clearfix">
                            Offers Over $435,000
                            <div class="rooms clearfix">
                                <span class="picon beds">4</span>		
                                <span class="picon baths">2</span>				
                                <span class="picon cars">2</span>		
                            </div>
                        </div>
                    </div>
                </div>

                <!-- Property title -->
                <a title="Bushland Backdrop, Immaculate Throughout!" href="<?php echo site_url('buying/house');  ?>" class="title museo bold">Replica Queenslander In Cashmere</a>
                <!-- Property address -->
                <span class="address">9 Hayden Street, CABOOLTURE</span>
            </div>
        </li>
        
        <li class="first even " id="listing-44580">	          
            <div class="property clearfix">
                <!-- Property image -->
                <div class="property-image">
                    <!-- Property image -->
                    <a href="<?php echo site_url('buying/house');  ?>" class="post-image">
                        <div><img src="<?php echo base_url(); ?>img/home-image1.png" style="width: 100%;height:100%;"></div>
                    </a>
                </div>

                <!-- Property  details -->
                <div class="property-body">
                    <!-- Property meta -->
                    <div class="property-meta">
                        <div class="price clearfix">
                            Offers Over $435,000
                            <div class="rooms clearfix">
                                <span class="picon beds">4</span>		
                                <span class="picon baths">2</span>				
                                <span class="picon cars">2</span>		
                            </div>
                        </div>
                    </div>
                </div>

                <!-- Property title -->
                <a title="Bushland Backdrop, Immaculate Throughout!" href="<?php echo site_url('buying/house');  ?>" class="title museo bold">Replica Queenslander In Cashmere</a>
                <!-- Property address -->
                <span class="address">9 Hayden Street, CABOOLTURE</span>
            </div>
        </li>
        <li class="first even " id="listing-44580">	          
            <div class="property clearfix">
                <!-- Property image -->
                <div class="property-image">
                    <!-- Property image -->
                    <a href="<?php echo site_url('buying/house');  ?>" class="post-image">
                        <div><img src="<?php echo base_url(); ?>img/home-image1.png" style="width: 100%;height:100%;"></div>
                    </a>
                </div>

                <!-- Property  details -->
                <div class="property-body">
                    <!-- Property meta -->
                    <div class="property-meta">
                        <div class="price clearfix">
                            Offers Over $435,000
                            <div class="rooms clearfix">
                                <span class="picon beds">4</span>		
                                <span class="picon baths">2</span>				
                                <span class="picon cars">2</span>		
                            </div>
                        </div>
                    </div>
                </div>

                <!-- Property title -->
                <a title="Bushland Backdrop, Immaculate Throughout!" href="<?php echo site_url('buying/house');  ?>" class="title museo bold">Replica Queenslander In Cashmere</a>
                <!-- Property address -->
                <span class="address">9 Hayden Street, CABOOLTURE</span>
            </div>
        </li>
        <li class="first even " id="listing-44580">	          
            <div class="property clearfix">
                <!-- Property image -->
                <div class="property-image">
                    <!-- Property image -->
                    <a href="<?php echo site_url('buying/house');  ?>" class="post-image">
                        <div><img src="<?php echo base_url(); ?>img/home-image1.png" style="width: 100%;height:100%;"></div>
                    </a>
                </div>

                <!-- Property  details -->
                <div class="property-body">
                    <!-- Property meta -->
                    <div class="property-meta">
                        <div class="price clearfix">
                            Offers Over $435,000
                            <div class="rooms clearfix">
                                <span class="picon beds">4</span>		
                                <span class="picon baths">2</span>				
                                <span class="picon cars">2</span>		
                            </div>
                        </div>
                    </div>
                </div>

                <!-- Property title -->
                <a title="Bushland Backdrop, Immaculate Throughout!" href="<?php echo site_url('buying/house');  ?>" class="title museo bold">Replica Queenslander In Cashmere</a>
                <!-- Property address -->
                <span class="address">9 Hayden Street, CABOOLTURE</span>
            </div>
        </li>
    </ol>
    <div class="clearfix"></div>
    <div class="datalist-navigation">

        <div class="nav-button"><img src="<?php echo base_url(); ?>img/datalist/nav_first.jpg"/></div>
        <div class="nav-button"><img src="<?php echo base_url(); ?>img/datalist/nav_prev.jpg"/></div>

        <div class="nav-button"><div class="nav-page nav-page-selected">1</div></div>
        <div class="nav-button"><div class="nav-page">2</div></div>
        <div class="nav-button"><div class="nav-page">3</div></div>
        <div class="nav-button"><div class="nav-page">4</div></div>
        <div class="nav-button"><div class="nav-page">5</div></div>

        <div class="nav-button"><img src="<?php echo base_url(); ?>img/datalist/nav_next.jpg"/></div>
        <div class="nav-button"><img src="<?php echo base_url(); ?>img/datalist/nav_last.jpg"/></div>


    </div>
</div>
<script>
    
    // Search form dropdown button
    $(function() {
        var content = $("#searchform-properties");
        var trigger = $("#search-bar");

        trigger.click(function() {
            if (content.is(":visible")) {
                content.hide();
                trigger.removeClass('active');
            } else {
                content.show();
                trigger.addClass('active');
            }
        });
    });

    // Surronding suburbs toggle button
    $(function() {

        // Initial state
		

        // Click events
        $(".toggle-button button").click(function(e){
            e.preventDefault();
            $(".toggle-button button").removeClass("selected");
            $(this).addClass("selected");

            // set hidden input value
            var val = $(this).val();
            $("input[name=surroundingSuburbs]").attr("checked",false);
            $("#surroundingSuburbs_" + val).attr("checked",true);

            // Toogle background image
            if(val == "yes") {
                $(".toggle-button").addClass("active");
            } else {
                $(".toggle-button").removeClass("active");
            }
        });
    });
</script>